-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Few adjustments to allow to use the server properly from the fronten… #1
Conversation
Do you prefer to throw a 500 error instead of 400? In this case, I think that it is a controlled error, and then maybe it is better to use 400. |
4a2c1a3
to
50e3866
Compare
d51809e
to
6eced82
Compare
6eced82
to
e65ef17
Compare
@@ -28,10 +28,6 @@ export class CreateSyncDto { | |||
if (!connectorDefinition) { | |||
return ['Connector definition is not defined']; | |||
} | |||
const sourceConnector = connectorDefinition.factory(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to create a sync object without validate the conector data?
constructor(private readonly repository: ISyncRepository) {} | ||
|
||
async execute(id: string) { | ||
const data = await this.repository.getSync(id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can create an SyncEntity and get the sourceConector from there to get the auth data. it Is better because we will have only one responsible to manage this, the entity
…d app